package com.jiutong.meipenggang.ui.fragments;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ScrollView;

import com.jiutong.meipenggang.R;
import com.jiutong.meipenggang.adapters.NewPeopleActAdapter;
import com.jiutong.meipenggang.base.BaseFragment;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 作用:新手活动fragment
 *
 * @author veken
 * @date 2017/8/11
 */

public class NewActFragment extends BaseFragment {

    @Bind(R.id.rv_new_act)
    RecyclerView rvNewAct;
    private List mList;

    @Override
    protected int getLayoutResouceId() {
        return R.layout.fragment_new_act;
    }

    @Override
    protected void initData(Bundle arguments) {
        mList = new ArrayList();
        for (int i = 0; i < 10; i++) {
            mList.add("1");
        }

    }

    @Override
    protected void initView() {
        super.initView();
        rvNewAct.setNestedScrollingEnabled(false);
        //当方向设置为HORIZONTAL时，第三个参数true表示向左滑动，false表示向右滑动
        LinearLayoutManager layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
        rvNewAct.setLayoutManager(layoutManager);
        rvNewAct.setAdapter(new NewPeopleActAdapter(getContext(), R.layout.item_new_activity, mList));

    }

}
